<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>6-window对象的常见事件</title>
	</head>
	<body>
		<button>点击</button>
		<script type="text/javascript">
			//onload事件类型 是判断文档对象是否完全加载成功
			//1.window.onload = function(){}
			//2.window.addEventListener('load',function(){})
			var btn = document.querySelector('button');
			window.onload = function(e){
				console.log('页面加载...over');
				btn.addEventListener('click',function(){
					alert(123);
				});
			}


			
			
		</script>
	</body>
</html>
